package com.wms.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;

@ApiModel("物料")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Validated
public class Material {
    @ApiModelProperty(value = "物料id",hidden = true)
    Integer id;
    @ApiModelProperty("创建人id")
    Integer createBy;
    @ApiModelProperty("更新人id")
    Integer updateBy;
    @ApiModelProperty("类别编码")
    String categoryCode;
    @ApiModelProperty("类别名称")
    String categoryName;
    @ApiModelProperty("物料编码")
    String code;
    @ApiModelProperty("物料名称")
    String name;
    @ApiModelProperty("物料规格")
    String spec;
    @ApiModelProperty("计量单位")
    String unit;
    @ApiModelProperty(value = "库存设置 1:已设置  2:未设置",example = "1",dataType = "Integer")
    Integer setStatus;
    @NotNull
    @Range(min = 1,max = 2)
    @ApiModelProperty("物料类型 1:产品  2:商品")
    Integer type;
    @ApiModelProperty("价格")
    Double price;
    @ApiModelProperty(value = "是否删除",hidden = true)
    Integer isdel;
}
